<script lang="ts" setup >
import { useRouter } from 'vue-router';
import type { Ref } from 'vue';
import { ref } from 'vue';
let router = useRouter()
let userarr: Ref<any[]> = ref([])
function out() {
    userarr.value = JSON.parse(String(localStorage.getItem('userarr')))
    console.log(userarr.value);

    for (let i = 0; i < userarr.value.length; i++) {
        userarr.value[i].userid = ''
        userarr.value[i].token = ''
    }
    localStorage.setItem('userarr', JSON.stringify(userarr.value))
    router.push('/login')
}
</script>
<template>
    <div style="padding: 10px;font-size: 20px;font-weight: bold;"><span @click="router.back()">&lt;</span></div>
    <div
        style="display: flex;justify-content: space-between;padding: 15px 10px;font-size: 18px;border-top: 1px solid #ccc;">
        <div>消息通知</div>
        <div style="font-weight: bold;color: gray;">></div>
    </div>
    <div
        style="display: flex;justify-content: space-between;padding: 15px 10px;font-size: 18px;border-top: 1px solid #ccc;">
        <div>常见问题</div>
        <div style="font-weight: bold;color: gray;">></div>
    </div>
    <div
        style="display: flex;justify-content: space-between;padding: 15px 10px;font-size: 18px;border-top: 1px solid #ccc;">
        <div>意见反馈</div>
        <div style="font-weight: bold;color: gray;">></div>
    </div>
    <div
        style="display: flex;justify-content: space-between;padding: 15px 10px;font-size: 18px;border-top: 1px solid #ccc;">
        <div>关于我们</div>
        <div style="font-weight: bold;color: gray;">></div>
    </div>
    <div
        style="display: flex;justify-content: space-between;padding: 15px 10px;font-size: 18px;border-top: 1px solid #ccc;">
        <div>版本信息</div>
        <div style="font-size: 16px; color: gray;">V1.1</div>
    </div>
    <div
        style="display: flex;justify-content: space-between;padding: 15px 10px;font-size: 18px;border-top: 1px solid #ccc;border-bottom: 1px solid #ccc; margin-bottom: 40px;">
        <div>清理缓存</div>
        <div style="font-size: 16px; color: gray;">11.8M</div>
    </div>
    <div style="width: 80%;margin: 0 auto;">
        <el-button color="#000" style="width: 100%;height: 50px;font-weight: bold;font-size: 16px;" @click="out">
            退出账号
        </el-button>
    </div>
</template> 
<style lang="scss" scoped></style>